
USE [Biblioteca]
GO
/****** Object:  StoredProcedure [dbo].[sp_EliminarUsuario]    Script Date: 09/02/2012 10:50:36 ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,Name>
-- Create date: <02/09/2012>
-- Description:	<SP que permite eliminar un usuario>
-- =============================================
CREATE PROCEDURE [dbo].[sp_EliminarUsuario]
@idSocio int,
@baja_usuario bit OUTPUT

AS
DELETE *
FROM Socio
WHERE idSocio=@idSocio

if(SELECT idSocio FROM Socio WHERE idSocio=@idSocio) is null
set @baja_usuario = 1
else
set @baja_usuario = 0
GO

